<template>
	<div>
		父亲
		<input type="text" v-model="lifeMsg">
		<Son :title="msg" :lifeMsg="lifeMsg" :num="num"/>
		<button @click="changeMsg">改变msg</button>
	</div>
</template>

<script>

	//导入组件
	import Son from "./Son"

	export default {
		name: 'mc',
		data() {
			return {
				msg: "我是活的",
				lifeMsg: "",
				num: 20
			}
		},

		//组件
		components: {
          Son
		},

		//方法
		methods:{
			changeMsg: function (event) {
				this.msg="我是修改之后的数据";
			}
		}
	}
</script>
<!-- 样式在本组件有效 -->
<style scoped>
	
</style>